package cn.yunlang.zhangZhongFei.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 奖品表
 *
 * @author ·
 * @since 2025-05-27 09:54:49
 */
@Data
@TableName("t_award")
@ApiModel(value = "Award对象", description = "奖品表")
public class Award implements Serializable {

  private static final long serialVersionUID = 1L;

  @ApiModelProperty(value = "id", hidden = true)
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  @ApiModelProperty("奖品名称")
  @TableField("award_name")
  private String awardName;

  @ApiModelProperty("奖品数量")
  @TableField("award_count")
  private Integer awardCount;

  @ApiModelProperty("抽奖时间(分钟)")
  @TableField("minutes")
  private Integer minutes;

  @ApiModelProperty("开始时间")
  @TableField("start_time")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date startTime;

  @ApiModelProperty("结束时间，这个后端计算")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @TableField("end_time")
  private Date endTime;

  @ApiModelProperty("奖品价值")
  @TableField("award_price")
  private BigDecimal awardPrice;

  @ApiModelProperty("奖品图片")
  @TableField("award_pic")
  private String awardPic;

  @ApiModelProperty("参与抽奖文案（发送：xxx参与抽奖）")
  @TableField("award_text")
  private String awardText;

  @ApiModelProperty("状态(0=未开始、1=进行中、2=已结束)")
  @TableField("state")
  private String state;

  @ApiModelProperty("是否删除(0=否，1=是)")
  @TableField("is_delete")
  @TableLogic
  private String isDelete;

  @ApiModelProperty("创建时间")
  @TableField(value = "create_time", fill = FieldFill.INSERT)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date createTime;

  @ApiModelProperty("修改时间")
  @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date updateTime;
}
